package ManagingResources

import (
	/*
		系统包
	*/
	"fmt"
	"net/http"
	/*
		API
	*/
	"../../API/DirDataAPI"
)

/*
	运行目录
*/
var CurrentPath string

/*
	初始化
*/
func init() {
	CurrentPath = DirDataAPI.GetCurrentPath()
}

/*
	个人资源
*/
func Personal(w http.ResponseWriter, r *http.Request) {
	fmt.Print(r.URL.String())
}

/*
	共用资源
*/
func Common(w http.ResponseWriter, r *http.Request) {
	DirDataAPI.SendFile(w, CurrentPath, r.URL.String())
}

/*
	用户处理
*/
func User(w http.ResponseWriter, r *http.Request) {
	w.Write([]byte("欢迎回家"))
}
func Member(w http.ResponseWriter, r *http.Request) {
	w.Write([]byte("尊敬的会员 欢迎回家"))
}
